package com.xc.stock.dto.model;


import com.xc.pojo.User;
import com.xc.stock.constant.AccountType;
import com.xc.stock.constant.Currency;
import com.xc.stock.utils.Utils;

import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.SuperBuilder;

@Data
@SuperBuilder
@NoArgsConstructor
public class AccountSelector {
	Integer pId;
	DestInfo dest;
	AccountType accountType;
	Currency currency;
	
	public static AccountSelector from(User user, AccountType accountType) {
		return AccountSelector.builder()
				.pId(0)
				.dest(Utils.userDestInfo(user))
				.currency(Currency.CNY)
				.accountType(accountType)
				.build();
	}
}
